//
//  UtilsMacro.h
//  WProjectForNative
//
//  Created by HuangZhen on 16/9/9.
//  Copyright © 2016年 HuangZhen. All rights reserved.

#ifndef UtilsMacro_h
#define UtilsMacro_h
#define ApplicationDelegate                 ((AppDelegate *)[[UIApplication sharedApplication] delegate])
#define UserDefaults                        [NSUserDefaults standardUserDefaults]
#define NavBarHeight                        64.0f
#define TabBarHeight                        self.tabBarController.tabBar.bounds.size.height
#define ScreenWidth                         [[UIScreen mainScreen] bounds].size.width
#define ScreenHeight                        [[UIScreen mainScreen] bounds].size.height

#define iPhone4 ([UIScreen mainScreen].bounds.size.height == 480)
#define iPhone5 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(640, 1136), [[UIScreen mainScreen] currentMode].size) : NO)
#define iPhone6 ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? (CGSizeEqualToSize(CGSizeMake(750, 1334), [[UIScreen mainScreen] currentMode].size)) : NO)
#define iPhone6plus ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? (CGSizeEqualToSize(CGSizeMake(1125, 2001), [[UIScreen mainScreen] currentMode].size) || CGSizeEqualToSize(CGSizeMake(1242, 2208), [[UIScreen mainScreen] currentMode].size)) : NO)

#define F(string, args...)                  [NSString stringWithFormat:string, args]

#define RGB(r, g, b)                        [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1.0]
#define RGBA(r, g, b, a)                    [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
#define HEXCOLOR(c)                         [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:1.0]
#define kBundleIdentifier         [[NSBundle mainBundle] bundleIdentifier]

#define KeyBoardInputAccessoryViewSpec                      (ScreenHeight>480?7.0f:29.0f)
//常用颜色
#define kNavBlueColor RGB(64,158,255)
#define kNavGreenColor RGB(111,205,28)
#define kMTintRedColor RGB(247,85,73)
#define kBackGroundColor RGB(26,35,46)
#define kWidgetBackGroundColor RGB(34,44,57)
#define kFormBackGroundColor RGB(49,64,83)
#define kStrokeBackGroundColor RGB(69,90,106)
#define kTitleBackGroundColor RGB(114,142,164)
#define kTextColor RGB(195,229,255)
#define kMTintBackgroundColor RGB(240,241,244)
#define kMTintLineColor RGB(224,224,224)
#define kWebNavigateColor RGB(249,249,249)
#define KWebShadowColor RGB(178,178,178)
#define kWTintBlueColor RGB(81,198,208)
#define kPayBlueColor RGB(76,161,224)
#define iPhoneXDevice ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125,2436), [[UIScreen mainScreen] currentMode].size) : NO)


#define BaseUrl @"http://newifi.teny.cn/api/v1"
#define PingFangSCLight @"PingFangSC-Light"
#define PingFangSCMedium @"PingFangSC-Medium"
#define PingFangSCRegular @"PingFangSC-Regular"
#endif /* UtilsMacro_h */
